package OnJava8.steams;

import java.util.stream.IntStream;

/**
 * @Author DRevelation
 * @Date 2020-06-18 下午 13:22
 * @Desc
 */
public class IntStreamDemo {
    public static void main(String[] args) {
        int[] nums = {1, 2, 3};
        int sum = IntStream.of(nums).sum();
        int sum2 = IntStream.of(1, 2, 3).sum();
        System.out.println(sum);
        System.out.println(sum2);
    }
}
